/*
	Copyright (c) 2010 <copyright holders>
	This source code is licensed under The MIT License,
	see the file LICENSE for details.
	*/

#ifndef NETDEFS_HPP
#define NETDEFS_HPP

#include "HelpDefs.hpp"

namespace spelprog2 {
namespace net {

struct NetException : public Exception {
    NetException(const std::string & description, const std::string & location) : Exception(0, description, location) { }
};

typedef unsigned UserId;

const UserId SERVER_ID = 0; //the server is a "user", whose variables are considered global
const UserId UNKNOWN_CLIENT_ID = 0; //client not yet assigned its own id
const UserId FIRST_FREE_ID = 1;
const int SERVER_PEER_LIMIT = 128; //TODO: move away

extern spelprog2::LogStream netlog;

}; //namespace net
}; //namespace spelprog2

#endif //NETDEFS_HPP
